package com.drinking.consumerfeign.controller;

import com.drinking.consumerfeign.service.ProviderService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class MyController {

    @Resource
    private ProviderService providerService;

    @RequestMapping("/test")
    public String test(){
        return providerService.test();
    }

    @RequestMapping("/test/{id}/{name}")
    public String test2(@PathVariable String id, @PathVariable String name){
        return providerService.test2(id,name);
    }

    @RequestMapping("/test04")
    public String test3(@RequestParam String id, @RequestParam String name){
        return providerService.test3(id,name);
    }

}
